/**
 * BulletCanvasElement类,代表子弹
 * @constructor
 * @param {*} options 子弹的参数
 */
function BulletCanvasElement(options) {
  options = Object.assign({}, {
    width: 1,
    height: 10,
    vx: 0,
    vy: 10,
    boundaryCoordinates: [30, 0, 670, 470],
    color: '#fff'
  }, options);
  BaseCanvasElement.call(this, options);
  this.color = options.color;
}

inheritPrototype(BulletCanvasElement, BaseCanvasElement);

/**
 * render方法
 */
BulletCanvasElement.prototype.render = function (context) {
  context.save();
  context.fillStyle = this.color;
  context.fillRect(this.x, this.y, this.width, this.height);
  context.restore();
}